﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcFrontEnd.Models.ViewPost>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        
    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <a href = "<%= Html.Encode(item.url) %>"><%= Html.Encode(item.Title) %></a>
            <br />
                <p> Posted at: <%= Html.Encode(item.Date.ToString()) %> </p>
            </td>
            <td>
                <%: item.Content %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

